<html>

<head>
<meta charset="UTF-8">
<title>添加部门</title>
</head>
<body>
	<link rel="stylesheet" type="text/css" href="/css/form.css">
	<script type="text/javascript" src="/js/user_manage.js"></script>
	<script type="text/javascript">
		$(".navigation span:first").text("部门管理");
	</script>
	<#include "/head.ftl"/>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="返回" class="btn btn-setting" onclick="back(this)">
					<i class="iconfont icon-undo"></i>
				</a> <a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a> 
			</div>
			<div class="form-content">
				<form id="deptForm" method="post">
					<fieldset>
						<table>
							<tr>
								<td>部门名称：</td>
								<td><input type="text" name="name" placeholder="部门名称不大于10个字符" maxlength="10" value="${(dept.name)?default('')}"></td>
								<td>部门电话：</td>
								<td><input type="text" name="tel" placeholder="格式：020-12345678" maxlength="20"  value="${(dept.tel)?default('')}"></td>
							</tr>
							<tr>
								<td>部门层级：</td>
								<td><input type="text" name="grade" placeholder="请输入3位以内的数字" maxlength="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d]/g,'')" value="${(dept.grade)?default('')}"></td>
								<td>规定打卡次数：</td>
								<td><input type="text" name="checkDay" placeholder="请输入2位以内的数字"  maxlength="2"  value="${(dept.checkDay)?default('22')}" onkeyup="this.value=this.value.replace(/[^\d]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"></td>
							</tr>
							<tr>
								<td>部门邮件：</td>
								<td><input type="text" name="email" placeholder="格式：bilibili@xx.com"  value="${(dept.email)?default('')}"></td>
								<td>部门传真：</td>
								<td><input type="text" name="fax" placeholder="格式：020-12345678" maxlength="20" value="${(dept.fax)?default('')}"></td>
							</tr>
							<tr>
								<td>上班时间：</td>
								<td>
									<input type="hidden" name="beginTime" onfocus="WdatePicker({dateFmt:'HH:mm',readOnly:true})" value="${(dept.beginTime)?default('')}">
									<select name="hour1" onchange="changeWorkTime()">
										<#list 0..23 as i>
											<#if i==9>
												<option value="${i?string('00')}" selected="selected">${i?string('00')}</option>
												<#else>
												<option value="${i?string('00')}">${i?string('00')}</option>
											</#if>
										</#list>
									</select> :
									<select name="minute1" onchange="changeWorkTime()">
										<option value="00">00</option>
										<option value="30">30</option>
									</select>
								</td>
								<td>下班时间：</td>
								<td>
									<input  type="hidden" name="endTime" onfocus="WdatePicker({dateFmt:'HH:mm',readOnly:true})" value="${(dept.endTime)?default('')}">
									<select name="hour2" onchange="changeWorkTime()">
										<#list 0..23 as i>
											<#if i==17>
												<option value="${i?string('00')}" selected="selected">${i?string('00')}</option>
												<#else>
												<option value="${i?string('00')}">${i?string('00')}</option>
											</#if>
										</#list>
									</select> :
									<select name="minute2" onchange="changeWorkTime()">
										<option value="00">00</option>
										<option value="30">30</option>
									</select>
								</td>
							</tr>
							<tr>
								<td style="text-align: center;" colspan="4">
									<input type="hidden" name="id" value="${(dept.id)?default('')}">
									<input class="button"style="padding: 11px 40px;" type="submit" value="保存">
								</td>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
		</div>

	</div>
</body>
</html>